import Vue from 'vue'
import { USER_INFO } from '@/store/mutation-types'
const getters = {
    device: state => state.app.device,
    theme: state => state.app.theme,
    color: state => state.app.color,
    token: state => state.user.token,
    avatar: state => state.user.avatar,
    nickname: state => state.user.name,
    welcome: state => state.user.welcome,
    permissionList: state => state.user.permissionList,
    userInfo: state => { state.user.info = Vue.ls.get(USER_INFO); return state.user.info },
    roles: state => state.user.roles,
    addRouters: state => state.permission.addRouters,
    multiTab: state => state.app.multiTab,
    lang: state => state.i18n.lang
  }

  export default getters
